package com.zixuan.sina.controller;

import com.zixuan.sina.entity.Post;
import com.zixuan.sina.entity.Topic;
import com.zixuan.sina.entity.vo.PostVo;
import com.zixuan.sina.service.PostService;
import com.zixuan.sina.service.TopicService;
import com.zixuan.sina.utils.FileUploadUtils;
import com.zixuan.sina.utils.Result;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/api/topic/")
public class TopicController {
    @Resource
    TopicService topicService;
    //根据关键字检索
    @PostMapping("list")
    public Result list(@RequestBody Topic topic){
        return topicService.listTopic(topic);
    }

}
